package C047;

import java.io.*;

/**
 * ClassName: C03
 * Package: C047
 * Description:
 *
 * @Author BCXJ
 * @Create 2025/2/9 12:32
 * @Version 1.0
 * @Since 1.0
 */
public class C03 {
    static int MAXLEN = 1000001;
    static int OFFSET = 30001;
    static int[] arr = new int[OFFSET * 2 + MAXLEN];
    static int n,m;
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StreamTokenizer in = new StreamTokenizer(br);
        PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
        while (in.nextToken() != StreamTokenizer.TT_EOF) {
            // n有多少个人落水，每个人落水意味着四个等差数列操作
            n = (int) in.nval;
            in.nextToken();
            // 一共有多少位置，1~m个位置，最终要打印每个位置的水位
            m = (int) in.nval;
            for (int i = 0, v, x; i < n; i++) {
                in.nextToken(); v = (int) in.nval;
                in.nextToken(); x = (int) in.nval;
                // v体积的朋友，在x处落水，修改差分数组
                fall(v, x);
            }
            // 生成最终的水位数组
            build();
            // 开始收集答案
            // 0...OFFSET这些位置是辅助位置，为了防止越界设计的
            // 从OFFSET+1开始往下数m个，才是正式的位置1...m
            // 打印这些位置，就是返回正式位置1...m的水位
            int start = OFFSET + 1;
            out.print(arr[start++]);
            for (int i = 2; i <= m; i++) {
                out.print(" " + arr[start++]);
            }
            out.println();
        }
        out.flush();
        out.close();
        br.close();
    }

    private static void build() {
        for (int i = 1; i <= m + OFFSET; i++) {
            arr[i] += arr[i - 1];
        }
        for (int i = 1; i <= m + OFFSET; i++) {
            arr[i] += arr[i - 1];
        }
    }

    private static void fall(int v, int x) {
        set(x - 3 * v + 1, x - 2 * v, 1, v, 1);
        set(x - 2 * v + 1, x, v - 1, -v, -1);
        set(x + 1, x + 2 * v, -v + 1, v, 1);
        set(x + 2 * v + 1, x + 3 * v - 1, v - 1, 1, -1);
    }

    public static void set(int l, int r, int s, int e, int d) {
        arr[l + OFFSET] += s;
        arr[l + 1 + OFFSET] += -s + d;
        arr[r + 1 + OFFSET] += (-d - e);
        arr[r + 2 + OFFSET] += e;
    }
}
